Python v3.7 HowTos:
Generate all permutations of a list
Access the index of a list
L1 = [1, 2, 3, 4] L2 = [1, 2] print(list(set(L1) - set(L2))) # [3, 4]
See also
https://www.w3resource.com/python-exercises/list/python-data-type-list-exercise-19.php